import { RouteRecordRaw } from 'vue-router'

const examples = [
    {
        "path": "/components-test",
        "name": "components",
        "component": () => import('@/components/Example.vue'),
        "meta": { "title": "组件测试", "icon": "icon-facebook" }
    },
]

const leftMenus: RouteRecordRaw[] = [
    // ...examples,
    {
        "path": "/auth/client",
        "name": "client",
        "component": () => import('@/views/client/List.vue'),
        "meta": { "title": "客户端", "icon": "icon-facebook" }
    },
    {
        "path": "/auth/apiscope",
        "name": "apiscope",
        "component": () => import('@/views/apiScope/List.vue'),
        "meta": { "title": "作用域", "icon": "icon-tuichu" }
    },
    {
        "path": "/auth/api/resource",
        "name": "api_resource",
        "component": () => import('@/views/apiResource/List.vue'),
        "meta": { "title": "API资源", "icon": "icon-tuichu" }
    },
    {
        "path": "/auth/resource",
        "name": "id_resource",
        "component": () => import('@/views/idResource/List.vue'),
        "meta": { "title": "身份资源", "icon": "icon-tuichu" }
    }
]

export const ConstRoutes: RouteRecordRaw[] = [
    {
        "path": "/",
        "name": "home",
        "component": () => import('@/layouts/BasicLayout.vue'),
        "meta": { "title": "主页" },
        "children": leftMenus
    },
    {
        path: '/login',
        name: 'login',
        component: () => import('@/views/auth/Login.vue')
    },
    {
        path: '/auth/callback',
        name: 'callback',
        meta: { hide: true },
        component: () => import('@/views/auth/Callback.vue')
    }
]
